﻿using Model;
using Org.BouncyCastle.Pqc.Crypto.Hqc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IService
{
    public interface IWhOutboundService
    {
        /// <summary>
        /// 获取出库订单详细信息
        /// </summary>
        /// <returns></returns>
        Task<List<StockOutDetailDto>> GetWhOutboundAll();
        /// <summary>
        /// 获取出库订单详细信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<List<StockOutDetailDto>> GetWhOutboundId(long id);
        /// <summary>
        /// 根据查询条件获取出库单信息
        /// </summary>
        /// <param name="parameters"></param>
        /// <returns></returns>
        Task<List<StockOutDetailDto>> GetWhOutboundByParams(StockOutQueryParams parameters);
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="data">实体</param>
        /// <returns>结果</returns>
        Task<int> CreateAsync(WhOutbound data);
        /// <summary>
        /// 根据ID查询
        /// </summary>
        /// <param name="Id">ID</param>
        /// <returns>用户列表</returns>
        Task<WhOutbound> GetByIdAsync(long Id);
        /// <summary>
        /// 创建出库单（包含明细和库存更新）
        /// </summary>
        Task<int> CreateOutboundWithDetailsAsync(WhOutbound outbound, List<WhOutboundDetail> details);
        /// <summary>
        /// 根据销售订单获取可出库货品
        /// </summary>
        Task<List<SalesOrderAvailableGoodsDto>> GetAvailableGoodsBySalesOrder(string salesOrderNo);
        /// <summary>
        /// 获取库位
        /// </summary>
        /// <returns></returns>
        Task<List<WhLocation>> WhLocationAllAsync();
        /// <summary>
        /// 根据仓库ID获取库位
        /// </summary>
        /// <param name="warehouseId">仓库ID</param>
        /// <returns></returns>
        Task<List<WhLocation>> GetLocationsByWarehouseIdAsync(long warehouseId);
       /// <summary>
       /// 获取收货人
       /// </summary>
       /// <returns></returns>
        Task<List<Users>> UserAll();
        /// <summary>
        /// 审核
        /// </summary>
        /// <param name="date"></param>
        /// <returns></returns>
        Task<int> UpdateAuditorComment(Auditor date);
        /// <summary>
        /// 状态更改
        /// </summary>
        /// <returns></returns>
        Task<int> AuditorStatus(string status, long id);
        /// <summary>
        /// 状态更改
        /// </summary>
        /// <returns></returns>
        Task<int> Status(string status, long id);
        /// <summary>
        /// 审核通过后执行实际出库
        /// </summary>
        Task<int> ExecuteActualOutbound(long stockOutOrderId);
        /// <summary>
        /// 根据ID删除订单及明细
        /// </summary>
        /// <param name="Id">订单ID</param>
        Task<int> DeleteAsync(long Id);
    }
}
